package com.surfin.safe.keyboard;

import android.content.Context;

import java.util.ArrayList;
import java.util.List;

public class KeyboardManager {


    private final List<IKeyboardListener> keyboardListenerList = new ArrayList<>();

    // context暂时还没用
    private Context context;


    private static KeyboardManager INSTANCE;

    public static KeyboardManager getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new KeyboardManager();
        }
        return INSTANCE;
    }

    public void addListener(IKeyboardListener listener) {
        keyboardListenerList.add(listener);
    }

    public void removeListener(IKeyboardListener listener) {
        keyboardListenerList.remove(listener);
    }

    public List<IKeyboardListener> getKeyboardListenerList() {
        return keyboardListenerList;
    }

    public void init(Context context) {
        this.context = context;
    }
}
